FROM mcr.microsoft.com/java/jre-headless:8u212-zulu-alpine

#setup timezone
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

ENV APPLICATION_NAME=config
ENV EXECUTE_JAR=${APPLICATION_NAME}-server.jar

ENV PORT=10000 \
    SECURITY_NAME="demon" \
    SECURITY_PASSWORD="demon" \
    GIT_URL="https://gitee.com/just3019/cloudresources.git" \
    GIT_USERNAME="455674848@qq.com" \
    GIT_PASSWORD="12345678a" \
    CONFIG_LABEL="master"


COPY . /data

VOLUME /data/logs

WORKDIR /data

CMD exec java -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -Xss256k \
    -jar ${EXECUTE_JAR} \
    --PORT=${PORT} \
    --SECURITY_NAME=${SECURITY_NAME} \
    --SECURITY_PASSWORD=${SECURITY_PASSWORD} \
    --GIT_URL=${GIT_URL} \
    --GIT_USERNAME=${GIT_USERNAME} \
    --GIT_PASSWORD=${GIT_PASSWORD} \
    --CONFIG_LABEL=${CONFIG_LABEL}